package com.base.cn.platform.os.entity.order.order;

import com.base.cn.platform.os.common.mybatis.BaseEntity;
import com.base.cn.platform.os.entity.op.activity.OpActivity;
import com.base.cn.platform.os.entity.op.coupon.OpCouponCode;
import com.base.cn.platform.os.entity.user.user.CusUser;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 订单实体
 *
 * @author s.li
 * @create 2018-05-07-16:43
 */
@Data
public class Order extends BaseEntity {
    /**订单号*/
    private String orderNo;
    /**订单类型，COMMON普通订单，ACCOUNT充值订单*/
    private String orderType;
    /**用户id*/
    private BigDecimal userId;
    /**订单原价格*/
    private Double sumPrice;
    /**会员减免金额*/
    private Double memberSubPrice;
    /**活动减额*/
    private Double activityPrice;
    /**优惠减金额*/
    private Double yhPrice;
    /**订单实际支付的价格（包含运费）*/
    private Double realPrice;
    /**运费*/
    private Double freightPrice;
    /**扣除用户账户银行金额*/
    private Double cashAmount;
    /**扣除用户账户充值卡金额*/
    private Double vmAmount;
    /**订单支付时间*/
    private Date payTime;
    /**支付类型alipy,kuaiqian,card,free*/
    private String payType;
    /**订单状态 init success refund cancel*/
    private String orderStatus;
    /**订单来源,WEB，APP，MOBILE*/
    private String orderForm;
    /**优惠券id*/
    private BigDecimal couponCodeId;
    /**活动ID*/
    private BigDecimal activityId;
    /**外部订单（第三方订单号）*/
    private String externalOrderNo;
    /**商品类型集*/
    private String sellTypeList;
    /**商品名串*/
    private String shopNames;
    /**是否是推广订单，0否，1是*/
    private Integer spread;
    /**推广分成金额*/
    private Double spreadPrice;
    /**资金金额*/
    private Double bonusPrice;

    /**
     * status 状态，1正常，2删除
     */

    //=================
    //流水列表
    private List<OrderDetails> orderDetailsList;
    //图书订单扩展数据
    private OrderBook orderBook;
    //订单归属用户
    private CusUser user;
    //订单使用的活动
    private OpActivity activity;
    //订单的优惠券编码对象
    private OpCouponCode couponCode;
    //订单中的商品数量
    private int buyNum;
}
